function [hmF1] = hMF1(hmF2, hmE)
%
% F1-Layer Maximum Density Height
%
%DESCRIPTION:
%This function computes the F1-Layer maximum density height.
%
%PROTOTYPE:
% [hmF1] = hMF1(hmF2)
% [hmF1] = hMF1(hmF2, hmE)
%
%--------------------------------------------------------------------------
% INPUTS:
%   hmF2       [1x1]       F2-Lay. Max. Dens. Height [km]
%   hmE        [1x1]       E-Lay. Max. Dens. Height  [km] (optional)
%--------------------------------------------------------------------------
% OUTPUTS:
%   hmF1       [1x1]       F1-Lay. Max. Dens. Height [km]
%--------------------------------------------------------------------------
%
%NOTES:
% (none)
%
%CALLED FUNCTIONS:
% (none)
%
%UPDATES:
% (none)
%
%REFERENCES:
% [1] "Ionospheric Correction Algorithm for Galileo Single-Frequency Users"
%      - European GNSS (Galileo) Open Service
%
%AUTHOR(s):
%Luigi De Maria, Matteo D'Addazio, 2022
%

%% Main Code

%E-Layer Input Check
if nargin == 1
    hmE = 120;
end

%F1-Layer Max. Dnesity Height [km]
hmF1 = (hmF2 + hmE) / 2;

end